﻿using Autofac;
using FlickrApi.Configuration;
using System.Reflection;
using Module = Autofac.Module;

[assembly: AssemblyVersion("1.0.0.0")]
namespace FlickrApi
{
    public class FlickrApiImplementation : Module
    {
        protected override void Load(ContainerBuilder builder)
        {
            builder.RegisterType<FileFlickrApiConfiguration>().As<IFlickrApiConfiguration>().SingleInstance();
            builder.Register(c => new NativeFlickrApiCaller
            {
                configuration = c.Resolve<IFlickrApiConfiguration>()
            })
            .As<IFlickrApiCaller>().SingleInstance();
        }
    }
}
